package mailsystem.persistance.database;

import mailsystem.persistance.MailsystemPersistance;

public class MailsystemPersistanceDB extends MailsystemPersistance {
	public MailsystemPersistanceDB(int theMailboxCount) {
		super(theMailboxCount);
	}

	@Override
	public void init() {
		mailboxes = new MailBoxDB(this);
		contacts = new ContactDB(this);
		newMessages = new NewMessageDB(this);
		keptMessages = new KeptMessageDB(this);
	}
	
	public void changeToTestMode()
	{
		mailboxes = new MailBoxDB(this);
		contacts = new ContactDB(this);
		newMessages = new NewMessageDB(this);
		keptMessages = new KeptMessageDB(this);
		((MailBoxDB)mailboxes).changeToTestMode();
		((ContactDB)contacts).changeToTestMode();
		((NewMessageDB)newMessages).changeToTestMode();
		((KeptMessageDB)keptMessages).changeToTestMode();
	}
}
